﻿//-----------------------------------------------------------------------
// <copyright file="AuthorizationServiceError.cs" company="Alan Rodrigues">
//     Copyright (c) Alan Rodrigues. All rights reserved.
// </copyright>
// <developed>Alan Rodrigues (operninha@gmail.com)</developed>
//-----------------------------------------------------------------------
using System.Runtime.Serialization;

namespace Authorization
{
    [DataContract(Name = "AuthorizationServiceError", Namespace = "AuthorizationServices")]
    public class AuthorizationServiceError
    {
        #region Variaveis

        #endregion

        #region Propriedades

        [DataMember(Name = "MethodName")]
        public string MethodName { get; set; }

        /// <summary>
        /// The code information of the error
        /// </summary>
        [DataMember(Name = "ErrorCode")]
        public int ErrorCode { get; set; }

        /// <summary>
        ///  Information detail about the error
        /// </summary>
        [DataMember(Name = "ErrorDetail")]
        public string ErrorDetail { get; set; }

        #endregion

        #region Construtores

        public AuthorizationServiceError(string methodName, string errorDetail)
        {
            MethodName = methodName;
            ErrorDetail = errorDetail;
        }

        public AuthorizationServiceError(string methodName, string errorDetail, int errorCode)
        {
            MethodName = methodName;
            ErrorDetail = errorDetail;
            ErrorCode = errorCode;
        }

        #endregion
    }
}